﻿using Basic.FlowCollect;
using Basic.FlowModel.DB;
using Basic.FlowRemoteModel.NodeEvent.Model;
using Basic.FlowService.Interface;

namespace Basic.FlowService.lmpl
{
    internal class FlowNodeEventService : IFlowNodeEventService
    {
        private readonly INodeEventCollect _Service;

        public FlowNodeEventService ( INodeEventCollect service )
        {
            this._Service = service;
        }
        public NodeEventDto[] Gets ( long nodeId )
        {
            return this._Service.GetsByNode<NodeEventDto>(nodeId);
        }
        public bool Set ( NodeEventSet obj )
        {
            return this._Service.Set(obj);
        }
        public void Delete ( long id )
        {
            DBFlowNodeEvent sour = this._Service.Get(id);
            this._Service.Delete(sour);
        }
    }
}
